home *** CD-ROM | disk | FTP | other *** search
/ Young Minds / Young Minds Interactive CD-ROM.ISO / kriegspi / patch1 < prev    next >
Encoding:
Text File  |  1987-07-07  |  1.9 KB  |  84 lines

  1.     [After my game was posted, I got some bug reports about some
  2.      stuff I used from 4.3 BSD that is not in 4.2 BSD, Ultrix, or
  3.      Sun's OS.  Here is a diff to make xks compile under 4.2.]
  4.  
  5. *** movecycle.c.old    Thu Jul  2 11:10:39 1987
  6. --- movecycle.c    Thu Jul  2 11:13:38 1987
  7. ***************
  8. *** 7,13 ****
  9.   #ifdef XKS
  10.   movecycle()
  11.   {
  12. !     fd_set readfds, fds;
  13.       extern int sock;
  14.       int n;
  15.   
  16. --- 7,13 ----
  17.   #ifdef XKS
  18.   movecycle()
  19.   {
  20. !     auto int readfds, fds;
  21.       extern int sock;
  22.       int n;
  23.   
  24. ***************
  25. *** 14,27 ****
  26.       XSelectInput(window, ExposeWindow | ExposeRegion |
  27.       ButtonPressed | ButtonReleased | LeaveWindow | LeftDownMotion |
  28.       KeyPressed);
  29. !     FD_ZERO(&fds);
  30. !     FD_SET(dpyno(), &fds);
  31. !     FD_SET(sock, &fds);
  32.       for(;;) {
  33.       while (XPending())
  34.           handle_input();
  35.       readfds = fds;
  36. !     n = select(FD_SETSIZE, &readfds, 0, 0, 0);
  37.       if (n < 0) {
  38.           if (errno == EINTR)
  39.           continue;
  40. --- 14,25 ----
  41.       XSelectInput(window, ExposeWindow | ExposeRegion |
  42.       ButtonPressed | ButtonReleased | LeaveWindow | LeftDownMotion |
  43.       KeyPressed);
  44. !     fds = 1<<dpyno() | 1<<sock;
  45.       for(;;) {
  46.       while (XPending())
  47.           handle_input();
  48.       readfds = fds;
  49. !     n = select(32, &readfds, 0, 0, 0);
  50.       if (n < 0) {
  51.           if (errno == EINTR)
  52.           continue;
  53. ***************
  54. *** 30,40 ****
  55.       }
  56.       if (n == 0)
  57.           exit(0);
  58. !     if (FD_ISSET(dpyno(), &readfds))
  59.           handle_input();
  60. !     if (FD_ISSET(sock, &readfds))
  61.           if (handle_sock()) {
  62. !         FD_CLR(sock, &fds);
  63.           close(sock);
  64.           sock = -1;
  65.           }
  66. --- 28,38 ----
  67.       }
  68.       if (n == 0)
  69.           exit(0);
  70. !     if (readfds & 1 << dpyno())
  71.           handle_input();
  72. !     if (readfds & 1 << sock)
  73.           if (handle_sock()) {
  74. !         fds &= ~(1 << sock);
  75.           close(sock);
  76.           sock = -1;
  77.           }
  78. *** /dev/null    Mon Jul  6 09:58:29 1987
  79. --- patchlevel.h    Mon Jul  6 10:15:23 1987
  80. ***************
  81. *** 0 ****
  82. --- 1 ----
  83. + #define PATCHLEVEL 1
  84.